//  导入封装的axios
import axios from "@/utils/http";
// 导入封装的接口地址
import * as baseURL from "@/api/url";
//查看管理人员个人信息
export const getAdminByUsername = (params) => {
    // 使用实际的 adminno 替换URL模板中的占位符
    const url = baseURL.administer_adminno_url.replace(':adminno', params.adminno);
    return axios({
      url: url,
      method: 'get',
      params: params,
    });
  };

//修改管理员个人信息
export const editAdminInfoAPI = (data) => {
 const administer_edit_url = "/administrator/mod";
  return axios({
    url: baseURL.administer_edit_url,
    method: 'post',
    data,
  });
};

// 搜索普通用户
export const getNormalByPageAPI = (params) => {
  return axios({
      url: 'http://localhost:8080/elder/page',
      method: "get",
      params,
  });
};

//修改普通用户
export const editNormalInfoAPI = (data) => {
  return axios({
      url: 'http://localhost:8080/elder/edit',
      method: "post",
      data
  })
}

//删除普通
export const deleteNormalByIdAPI = (data) => {
  return axios({
      url: baseURL.nurse_delete_url,
      method: "post",
      data
  })
}